-
Notifications
You must be signed in to change notification settings - Fork 3
#186: Avoid multiple saves when handling name and address protection #187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#186: Avoid multiple saves when handling name and address protection #187
Conversation
| // Only manipulate element on submission create form. | ||
| if (!$webformSubmission->isCompleted()) { | ||
| if ($cprLookupResult && $cprLookupResult->isNameAddressProtected()) { | ||
| // @todo What is this used for? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comes from this requirement in BKDK-550:
https://os2web.atlassian.net/browse/BKDK-550?focusedCommentId=64745
The address field needed to have a hint that it's protected/beskyttet
I see that this key is most likely custom one: #info_message i also don't see any theme using it. For me, it's same to delete this line
If that answers the questions, please remove todo comment from the code 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stankut, do you suggest removing
$element['#info_message'] = 'adresse beskyttelse';
(along with the todo comment)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that was my idea. Please do that while you're on it, i see no effect of this line anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modules/os2forms_nemid/src/Plugin/WebformElement/NemidAddress.php
Outdated
Show resolved
Hide resolved
| // Only manipulate element on submission create form. | ||
| if (!$webformSubmission->isCompleted()) { | ||
| if ($cprLookupResult && $cprLookupResult->isNameAddressProtected()) { | ||
| // @todo What is this used for? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stankut, do you suggest removing
$element['#info_message'] = 'adresse beskyttelse';
(along with the todo comment)?
…ess-protected-submission
…ess-protected-submission
Handles #186 by ensuring submissions are not saved twice.
Important
This PR is currently aimed at the master branch since the develop branch is many features ahead and a potential patch version should be without these features.